package com.my.cd.factory.methodFactory;

import com.my.cd.factory.pizza.LDCheesePizza;
import com.my.cd.factory.pizza.LDPepperPizza;
import com.my.cd.factory.pizza.Pizza;

/**
 * 工厂方法实现类：伦敦披萨订单
 */
public class LDOrderPizza extends OrderPizza {

    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")) {
            pizza = new LDPepperPizza();
        }
        return pizza;
    }

}
